//
//  ZHSettingButton.m
//  LoveFreshBee
//
//  Created by brice Mac on 2016/10/16.
//  Copyright © 2016年 王忠迪. All rights reserved.
//

#import "ZHSettingButton.h"

@implementation ZHSettingButton

- (instancetype)initWithTitle:(NSString *)title image:(UIImage *)image target:(id)target actionName:(SEL)actionName {
    
    UIButton *btn = [[UIButton alloc]init];
    
    [btn setTitle:title forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
    
    [btn setImage:image forState:UIControlStateNormal];
    
    //设置字号
    btn.titleLabel.font = [UIFont systemFontOfSize:14];
    
    [btn sizeToFit];
    
    
    if (target != nil) {
        
        [btn addTarget:target action:actionName forControlEvents:UIControlEventTouchUpInside];
    }
    
    self = [super initWithCustomView:btn];
    
    return self;
}




@end
